/**
 * @author Jun
 * on Jun 26, 2012, 2012
 */
package com.fastwire.carriere.rad.entity;

import com.fastwire.carriere.common.constant.AppConstants;

/**
 * @author Jun
 * on Jun 26, 2012, 2012
 */
public class RadTermPoint  // interface of the RAD
{
    private long oid;
    private int version;
    
    private int slot;  
    private int port;  // index
    private String descr;
    
    /*
     * tpTpye:
     * 6: ethernetCsmacd
     * 45: v35 HS
     * 19: E1
     * 1: other
     */
    private int type;

    private int mtu;
    private long speed;
    private String physAddress;
    private String adminStatus;  // 1: up, 2 down
    private String operStatus;   // 1: up, 2 down

    //private String ipAddr; //
    
    private String status; // active or inactive
    
    private Rad rad; // the containing rad
    
    public RadTermPoint()
    {
        slot = 1;   // only one slot 
        port = 0;
    }

    /**
     * @return the oid
     */
    public long getOid()
    {
        return oid;
    }


    /**
     * @param oid the oid to set
     */
    public void setOid(long oid)
    {
        this.oid = oid;
    }


    /**
     * @return the version
     */
    public int getVersion()
    {
        return version;
    }


    /**
     * @param version the version to set
     */
    public void setVersion(int version)
    {
        this.version = version;
    }

    /**
     * @return the slot
     */
    public int getSlot()
    {
        return slot;
    }

    /**
     * @param slot the slot to set
     */
    public void setSlot(int slot)
    {
        this.slot = slot;
    }

    /**
     * @return the port
     */
    public int getPort()
    {
        return port;
    }

    /**
     * @param port the port to set
     */
    public void setPort(int port)
    {
        this.port = port;
    }


    
    /**
     * @return the type
     */
    public int getType()
    {
        return type;
    }

    /**
     * @param type the type to set
     */
    public void setType(int type)
    {
        this.type = type;
    }

    /**
     * @return the mtu
     */
    public int getMtu()
    {
        return mtu;
    }

    /**
     * @param mtu the mtu to set
     */
    public void setMtu(int mtu)
    {
        this.mtu = mtu;
    }    

    /**
     * @return the speed
     */
    public long getSpeed()
    {
        return speed;
    }

    /**
     * @param speed the speed to set
     */
    public void setSpeed(long speed)
    {
        this.speed = speed;
    }

    /**
     * @return the physAddress
     */
    public String getPhysAddress()
    {
        return physAddress;
    }

    /**
     * @param physAddress the physAddress to set
     */
    public void setPhysAddress(String physAddress)
    {
        this.physAddress = physAddress;
    }

    /**
     * @return the adminStatus
     */
    public String getAdminStatus()
    {
        return adminStatus;
    }

    /**
     * @param adminStatus the adminStatus to set
     */
    public void setAdminStatus(String adminStatus)
    {
        this.adminStatus = adminStatus;
    }

    /**
     * @return the operStatus
     */
    public String getOperStatus()
    {
        return operStatus;
    }

    /**
     * @param operStatus the operStatus to set
     */
    public void setOperStatus(String operStatus)
    {
        this.operStatus = operStatus;
    }

    /**
     * @return the status
     */
    public String getStatus()
    {
        return status;
    }


    /**
     * @param status the status to set
     */
    public void setStatus(String status)
    {
        this.status = status;
    }
    
    public void invalidate()
    {
        setStatus(AppConstants.NE_STATUS_INACTIVE);
    }

    /**
     * @return the descr
     */
    public String getDescr()
    {
        return descr;
    }

    /**
     * @param descr the descr to set
     */
    public void setDescr(String descr)
    {
        this.descr = descr;
    }

    /**
     * @return the rad
     */
    public Rad getRad()
    {
        return rad;
    }

    /**
     * @param rad the rad to set
     */
    public void setRad(Rad rad)
    {
        this.rad = rad;
    }
}
